/*
 * @Author: LiMG
 * @Date: 2024-01-17 16:15:44
 * @Description: 布局页面的状态
 */
import { defineStore } from "pinia";

export const useLayoutStore = defineStore("layout", {
    state: () => {
        return {
            // 菜单是否折叠
            menuCollapse: false,
            // 是否全屏
            fullScreenFlag: false,
        };
    },
    getters: {
        getMenuCollapse(): boolean {
            return this.menuCollapse;
        },
        getFullScreenFlag(): boolean {
            return this.fullScreenFlag;
        },
    },
    actions: {
        setMenuCollapse(menuCollapse: boolean) {
            this.menuCollapse = menuCollapse;
        },
        setFullScreenFlag(fullScreenFlag: boolean) {
            this.fullScreenFlag = fullScreenFlag;
        },
    },
});

export default useLayoutStore;
